<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%String rootpath = request.getContextPath(); %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

        <link rel="stylesheet" type="text/css" href="../jquery/css/custom-theme/jquery-ui-1.7.2.custom.css">
        <link rel="stylesheet" type="text/css" href="../jquery/css/ui.jqgrid.css">
        <script type="text/javascript" src="../jquery/js/jquery-1.3.2.min.js"></script>
        <script type="text/javascript" src="../jquery/js/grid.locale-cn.js"></script>
        <script type="text/javascript" src="../jquery/js/jquery.jqGrid.min.js"></script>
        <script type="text/javascript">
            $(document).ready(function(){
            	  jQuery("#list").jqGrid({
            		    datatype: function(postdata){
            		        $.getJSON(
                              "../manager/findAllRegisterAction",
                              null,
                              function(data){
                            	  var list = eval("("+data+")");
                                  for(var i=0;i<list.length;i++)
                                      $("#list").addRowData(i+1,list[i]);
                              }
                          );
            		    },
            		    colNames:['Id','Name', 'Password','Nation','Age','SudokuAge'],
            		    colModel :[ 
            		      {name:'sudokuId', index:'sudokuId', width:55}, 
            		      {name:'sudokuerName', index:'sudokuerName', width:90}, 
            		      {name:'password', index:'password', width:80, align:'right'}, 
            		      {name:'nation', index:'nation', width:80, align:'right'}, 
            		      {name:'age', index:'age', width:80, align:'right'}, 
            		      {name:'sudokuAge', index:'sudokuAge', width:150, sortable:false} 
            		    ],
            		    pager: '#pager',
            		    rowNum:10,
            		    rowList:[10,20,30],
            		    sortname: 'id',
            		    sortorder: 'desc',
            		    viewrecords: true,
            		    caption: 'My first grid',
            		  }); 
            });
        </script>
        
        <title>Insert title here</title>
    </head>
    <body>
        <table id="list"></table> 
        <!-- <div id="pager"></div> -->
    </body>
</html>